<?php
class user_m extends m {
  function __construct()
  {
    parent::__construct();
    $this->table = 'user';
    $this->fields = array('name','pwd','email','mobile','officetel','hometel','depart','leader','admin');
  }
  
  function getid($name)
  {
    $u = $this->db->query("select id from user where name='$name'");
    return $u[0]['id'];
  }
}
